package client.behavioral.observer.ext;

import org.xml.sax.SAXException;
import uml.behavioral.observer.ext.CarDriver;
import uml.behavioral.observer.ext.Driver;
import uml.behavioral.observer.ext.Light;
import uml.behavioral.observer.ext.TransLight;

import javax.xml.parsers.ParserConfigurationException;
import java.io.IOException;

/**
 * on 2023/1/4 17:24
 */
public class Client {
    public static void main(String[] args) throws ParserConfigurationException, IOException, InterruptedException, SAXException {
        Light light = new TransLight();
        Driver driver = new CarDriver("贵A·45767",false);
        Driver drive2 = new CarDriver("贵A·457688",false);
        light.willBeObservedBy(driver);
        light.willBeObservedBy(drive2);
        light.changeState();
    }
}
